package com.example.automanagement.service.serviceImpl;

import com.example.automanagement.entity.AutoStatus;
import com.example.automanagement.mapper.AutoStatusMapper;
import com.example.automanagement.service.AutoStatusService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AutoStatusServiceImpl implements AutoStatusService {
    @Resource
    private AutoStatusMapper statusMapper;

    @Override
    public void addAutoStatus(AutoStatus autoStatus) {
        statusMapper.addAutoStatus(autoStatus);
    }

    @Override
    public void updateAutoBusy(String autoId) {
        statusMapper.updateAutoBusy(autoId);
    }

    @Override
    public void updateAutoRepairing(String autoId) {
        statusMapper.updateAutoRepairing(autoId);
    }

    @Override
    public void updateAutoFree(String autoId) {
        statusMapper.updateAutoFree(autoId);
    }

    @Override
    public void deleteAutoStatus(String autoId) {
        statusMapper.deleteAutoStatus(autoId);
    }

    @Override
    public List<AutoStatus> getAllAutoStatus() {
        return statusMapper.getAllAutoStatus();
    }
}
